﻿<%@ Page Title="" Language="C#" MasterPageFile="~/rightContent.Master" AutoEventWireup="true"
    CodeBehind="workPlanView.aspx.cs" Inherits="WEB.workPlan.workPlanView" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {
            height: 33px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="title" runat="server">
查看计划
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
    <table width="100%">
        <tr>
            <td>
                &nbsp;
            </td>
        </tr>
        <td>
            <table>
                <tr align="center" style="margin-left: '100px';">
                    <td width="200px" class="style1">
                        &nbsp;
                    </td>
                    <td align="center" class="style1">
                        时间范围：<asp:TextBox ID="tbTimestart" runat="server" class="Wdate"></asp:TextBox>
                        至 <asp:TextBox ID="tbTimestop" runat="server" class="Wdate"></asp:TextBox>
                        <asp:DropDownList ID="ddl" runat="server" AutoPostBack="True" 
                            onselectedindexchanged="ddl_SelectedIndexChanged" style="margin-top: 0px">
                            <asp:ListItem Value="0">作废</asp:ListItem>
                            <asp:ListItem Value="1">未完成</asp:ListItem>
                            <asp:ListItem Value="2">完成</asp:ListItem>
                            <asp:ListItem Selected="True" Value="3">全部</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td width="200px">
                        &nbsp;
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlQuery" runat="server">
                            <asp:ListItem Value="CustomerName">客户名</asp:ListItem>
                            <asp:ListItem Value="goodsName">货名</asp:ListItem>
                            <asp:ListItem Value="workman">执行人</asp:ListItem>
                        </asp:DropDownList>
                        &nbsp;<asp:TextBox ID="tbQuery" runat="server" Style="margin-bottom: 0px" 
                            Width="275px"></asp:TextBox>
                        &nbsp;
                        <asp:Button ID="btQuery" runat="server" Text="   查 询" Width="69px" 
                            OnClick="btQuery_Click" CssClass="Submit_Query" />
                    </td>
                </tr>
            </table>
        </td>
        <tr>
            <td>
                <table>
                    <tr>
                        <td align="center">
                            <asp:GridView ID="gvPlan" runat="server" AutoGenerateColumns="False" BackColor="White"
                                BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black"
                                GridLines="Vertical" onrowcommand="gvPlan_RowCommand" 
                                onrowdatabound="gvPlan_RowDataBound" style="margin-right: 0px" 
                                DataKeyNames="ID" CssClass="distance" AllowPaging="True" 
                                onpageindexchanging="gvPlan_PageIndexChanging" HorizontalAlign="Center">
                                <AlternatingRowStyle BackColor="White" />
                                <Columns>
                                    <asp:BoundField DataField="ID" HeaderText="编号" Visible="False" >
                                    <ItemStyle Width="50px" />
                                    </asp:BoundField>
                                    <asp:ButtonField ButtonType="Button" Text="修改" CommandName="Alter" >
                                    </asp:ButtonField>
                                    <asp:TemplateField ShowHeader="False">
                                        <ItemTemplate>
                                            <asp:Button ID="Button1" runat="server" CausesValidation="False" 
                                                CommandName="Delete1" onclick="BtnDelete_Click" 
                                                onclientclick="return confirm('是否确认删除？')"  
                                                CommandArgument='<%# Eval("ID") %>' Text="删除" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField ShowHeader="False">
                                        <ItemTemplate>
                                            <asp:Button ID="Button3" runat="server" CausesValidation="False" 
                                                CommandArgument='<%# Eval("ID") %>' onclick="BtnInvalid_Click" 
                                                onclientclick="return confirm('是否确认作废？')" Text="作废" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField ShowHeader="False">
                                        <ItemTemplate>
                                            <asp:Button ID="Button2" runat="server" CausesValidation="False" 
                                                CommandArgument='<%# Eval("ID") %>' CommandName="revive" Height="28px" onclick="BtnRevive_Click" 
                                                onclientclick="return confirm('是否确认取消作废？')" Text="取消作废" Width="70px" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="planDate" HeaderText="计划日期" DataFormatString="{0:d}">
                                        <ItemStyle Width="100px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="CustomerName" HeaderText="客户名">
                                        <ItemStyle Width="100px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="goodsName" HeaderText="货名">
                                        <ItemStyle Width="100px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="shipName" HeaderText="船名">
                                        <ItemStyle Width="100px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="No" HeaderText="数量">
                                        <ItemStyle Width="100px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="job" HeaderText="工作内容">
                                        <ItemStyle Width="100px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="note" HeaderText="注意事项">
                                        <ItemStyle Width="100px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="workMan" HeaderText="执行人">
                                        <ItemStyle Width="100px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="remark" HeaderText="备注">
                                        <ItemStyle Width="100px" />
                                    </asp:BoundField>
                                    <asp:TemplateField HeaderText="状态">
                                        <ItemTemplate>
                                            <asp:DropDownList ID="ddlstates" runat="server">
                                                <asp:ListItem Value="0">作废</asp:ListItem>
                                                <asp:ListItem Value="1">未完成</asp:ListItem>
                                                <asp:ListItem Value="2">完成</asp:ListItem>
                                            </asp:DropDownList>
                                        </ItemTemplate>
                                        <ItemStyle Width="100px" />
                                    </asp:TemplateField>
                                </Columns>
                                <FooterStyle BackColor="#CCCC99" />
                                <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                                
                                <PagerTemplate>
                                    <br />
                                    <asp:Label ID="lblPage" runat="server" Text='<%# "第" + (((GridView)Container.NamingContainer).PageIndex + 1)  + "页/共" + (((GridView)Container.NamingContainer).PageCount) + "页" %> '></asp:Label>
                                    <asp:LinkButton ID="lbnFirst" runat="Server" Text="首页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                                        CommandName="Page" CommandArgument="First"></asp:LinkButton>
                                    <asp:LinkButton ID="lbnPrev" runat="server" Text="上一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                                        CommandName="Page" CommandArgument="Prev"></asp:LinkButton>
                                    <asp:LinkButton ID="lbnNext" runat="Server" Text="下一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                                        CommandName="Page" CommandArgument="Next"></asp:LinkButton>
                                    <asp:LinkButton ID="lbnLast" runat="Server" Text="尾页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                                        CommandName="Page" CommandArgument="Last"></asp:LinkButton>
                                    到第<asp:TextBox runat="server" ID="inPageNum" Width="30px"></asp:TextBox>页
                                    <asp:Button ID="Button1" CommandName="go" Text="GO" runat="server" />
                                    <br />
                                </PagerTemplate>
                               
                                <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Left" />
                                <RowStyle BackColor="#F7F7DE" />
                                <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                                <SortedAscendingCellStyle BackColor="#FBFBF2" />
                                <SortedAscendingHeaderStyle BackColor="#848384" />
                                <SortedDescendingCellStyle BackColor="#EAEAD3" />
                                <SortedDescendingHeaderStyle BackColor="#575357" />

<SortedAscendingCellStyle BackColor="#FBFBF2"></SortedAscendingCellStyle>

<SortedAscendingHeaderStyle BackColor="#848384"></SortedAscendingHeaderStyle>

<SortedDescendingCellStyle BackColor="#EAEAD3"></SortedDescendingCellStyle>

<SortedDescendingHeaderStyle BackColor="#575357"></SortedDescendingHeaderStyle>
                            </asp:GridView>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Content>
